package com.thb.pay.api.sys.fallback;

import com.thb.pay.api.sys.SysConfigServiceApi;
import com.thb.pay.api.sys.vo.req.SysConfigPageReq;
import com.thb.pay.api.sys.vo.req.SysConfigReq;
import com.thb.pay.api.sys.vo.resp.SysConfigVo;
import com.thb.pay.core.utils.PageResult;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Slf4j
@Component
public class SysConfigServiceApiFallbackFactory implements FallbackFactory<SysConfigServiceApi> {


    @Override
    public SysConfigServiceApi create(Throwable throwable) {
        return new SysConfigServiceApi() {

            @Override
            public PageResult<SysConfigVo> findPage(@RequestBody SysConfigPageReq pageReq) {
                return null;
            }

            @Override
            public SysConfigVo getById(Long id) {
                return null;
            }

            @Override
            public List<SysConfigVo> findListByType(@RequestParam("type") String type) {
                return null;
            }

            @Override
            public SysConfigVo getByCode(@RequestParam("code") String code) {
                return null;
            }

            @Override
            public void updateAll(@RequestBody List<SysConfigReq> configReqList) {

            }

            @Override
            public void save(@RequestBody SysConfigReq configReq) {

            }

            @Override
            public void update(SysConfigReq configReq) {

            }
        };
    }
}